package com.example.b_308.myapplication.view.splash;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;

import com.example.b_308.myapplication.view.user.login.LoginActivity;
import com.example.b_308.myapplication.controller.SplashController;
import com.example.b_308.myapplication.view.base.BaseActivity;
import com.example.b_308.myapplication.R;

import java.util.List;

/**
 * Created by B-308 on 2017/11/15.
 */
public class SplashActivity extends BaseActivity implements ISplashView{
    SplashController splashController;
    CountDownTimer countDownTimer=new CountDownTimer(1000,1000) {
        @Override
        public void onTick(long millisUntilFinished) {

        }
        @Override
        public void onFinish() {
            /*startActivity(new Intent(SplashActivity.this,LoginActivity.class));*/
            tend2(LoginActivity.class);
        }
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        splashController=new SplashController(this);
        splashController.check();
    }

    @Override
    public void haveNewVision() {

    }

    @Override
    public void isFirstUsed() {

    }

    @Override
    public void haveUnablePremission(List<String> premission) {

    }

    @Override
    public void checkSuccess() {
        countDownTimer.start();
    }

    @Override
    public void fail(String message) {

    }
}
